<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>

    // Object.create()  创建一个对象,配置对象原型属性指向 (功能同4)

    var obj = Object.create(Array.prototype);
    console.log("obj",obj);

    // 等价于
    // var obj = {}
    // Object.setPrototypeOf(obj,Array.prototype);
    // console.log("obj",obj);


    var obj = Object.create(null)
    console.log("obj",obj);

    // // 等价于
    // var obj = {}
    // Object.setPrototypeOf(obj,null);
    // console.log("obj",obj);


</script>
</html>